import { Sex } from "./t04-自定义类型type";

//属性修饰符
/*
    readonly 只读,不允许修改
    default 默认的缺省的,不加任何修饰符的

*/
export class Person{
    private name:string;

    //给name进行赋值的方法
    setName(name:string){
        this.name=name;
    }
    //获取name的方法
    getName(){
        return this.name;
    }

    protected age:number;
    public sex:Sex;
    readonly height:number;
    constructor(name:string,age:number,sex:Sex,height:number){
        this.name=name;
        this.age=age;
        this.sex=sex;
        this.height=height;
    }
}